<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('appDown/from','CmsService@redirectDown');
Route::get('appConfig/get','CmsService@appConfig');
Route::post('appConfig/get','CmsService@appConfig');

Route::get('app/downList','CmsService@downList');
Route::post('app/downList','CmsService@downList');
Route::get('app/downAdd','CmsService@downAdd');
Route::post('app/downAdd','CmsService@downAdd');
Route::get('app/downInfo','CmsService@downInfo');
Route::post('app/downInfo','CmsService@downInfo');
Route::get('app/downEdit','CmsService@downEdit');
Route::post('app/downEdit','CmsService@downEdit');
Route::get('app/downTop','CmsService@downTop');
Route::post('app/downTop','CmsService@downTop');
Route::get('app/downEnable','CmsService@downEnable');
Route::post('app/downEnable','CmsService@downEnable');
Route::get('app/downDelete','CmsService@downDelete');
Route::post('app/downDelete','CmsService@downDelete');
Route::get('seckill/get','CmsService@seckillInfo');
Route::post('seckill/get','CmsService@seckillInfo');
Route::get('seckill/delete','CmsService@seckillDelete');
Route::post('seckill/delete','CmsService@seckillDelete');
Route::get('seckill/getList','CmsService@seckillList');
Route::post('seckill/getList','CmsService@seckillList');
Route::get('seckill/add','CmsService@seckillAdd');
Route::post('seckill/add','CmsService@seckillAdd');
Route::get('seckill/edit','CmsService@seckillEdit');
Route::post('seckill/edit','CmsService@seckillEdit');
Route::get('block/getByCode','CmsService@getBlockByCode');
Route::post('block/getByCode','CmsService@getBlockByCode');
Route::get('article/getById','CmsService@getArticleContent');
Route::post('article/getById','CmsService@getArticleContent');
Route::get('article/getListByCode','CmsService@getArticleListByCode');
Route::post('article/getListByCode','CmsService@getArticleListByCode');

Route::get('admin/activity/getList','CmsService@activityList');
Route::post('admin/activity/getList','CmsService@activityList');
Route::get('admin/activity/get','CmsService@activityInfo');
Route::post('admin/activity/get','CmsService@activityInfo');
Route::get('admin/activity/put','CmsService@activityUpdate');
Route::post('admin/activity/put','CmsService@activityUpdate');
Route::get('admin/activity/close','CmsService@activityClose');
Route::post('admin/activity/close','CmsService@activityClose');
Route::get('admin/activity/getData','CmsService@activityData');
Route::post('admin/activity/getData','CmsService@activityData');

Route::get('admin/point/update','CmsService@userPoint');
Route::post('admin/point/update','CmsService@userPoint');

Route::get('admin/user/export','CmsService@userExport');
Route::post('admin/user/export','CmsService@userExport');
Route::get('admin/user/getList','CmsService@userList');
Route::post('admin/user/getList','CmsService@userList');

Route::get('admin/sku/getLog','CmsService@skuLog');
Route::post('admin/sku/getLog','CmsService@skuLog');
Route::get('admin/sku/del','CmsService@skuDel');
Route::post('admin/sku/del','CmsService@skuDel');
Route::get('admin/sku/put','CmsService@skuPut');
Route::post('admin/sku/put','CmsService@skuPut');
Route::get('admin/sku/get','CmsService@skuInfo');
Route::post('admin/sku/get','CmsService@skuInfo');
Route::get('admin/sku/getList','CmsService@skuList');
Route::post('admin/sku/getList','CmsService@skuList');

Route::get('admin/category/del','CmsService@delCategory');
Route::post('admin/category/del','CmsService@delCategory');
Route::get('admin/block/del','CmsService@delBlock');
Route::post('admin/block/del','CmsService@delBlock');
Route::get('admin/article/editReadCount','CmsService@editArticleReadCount');
Route::post('admin/article/editReadCount','CmsService@editArticleReadCount');
Route::get('admin/article/getList','CmsService@getArticleList');
Route::post('admin/article/getList','CmsService@getArticleList');
Route::get('admin/article/del','CmsService@delArticle');
Route::post('admin/article/del','CmsService@delArticle');
Route::get('admin/article/ban','CmsService@banArticle');
Route::post('admin/article/ban','CmsService@banArticle');
Route::get('admin/article/update','CmsService@editArticle');
Route::post('admin/article/update','CmsService@editArticle');
Route::get('admin/article/get','CmsService@getArticle');
Route::post('admin/article/get','CmsService@getArticle');
Route::get('admin/article/top','CmsService@topArticle');
Route::post('admin/article/top','CmsService@topArticle');
Route::get('admin/category/ban','CmsService@banCategory');
Route::post('admin/category/ban','CmsService@banCategory');
Route::get('admin/block/ban','CmsService@banBlock');
Route::post('admin/block/ban','CmsService@banBlock');
Route::get('admin/category/updateName','CmsService@updateCategoryName');
Route::post('admin/category/updateName','CmsService@updateCategoryName');
Route::get('admin/block/updateName','CmsService@updateBlockName');
Route::post('admin/block/updateName','CmsService@updateBlockName');
Route::get('admin/block/get','CmsService@getBlock');
Route::post('admin/block/get','CmsService@getBlock');
Route::get('admin/block/update','CmsService@updateBlock');
Route::post('admin/block/update','CmsService@updateBlock');
Route::get('admin/block/create','CmsService@createBlock');
Route::post('admin/block/create','CmsService@createBlock');
Route::get('admin/category/create','CmsService@createCategory');
Route::post('admin/category/create','CmsService@createCategory');
Route::get('admin/block/getList','CmsService@getBlockList');
Route::post('admin/block/getList','CmsService@getBlockList');
Route::get('admin/category/getList','CmsService@getCategoryList');
Route::post('admin/category/getList','CmsService@getCategoryList');
Route::get('admin/article/add','CmsService@addArticle');
Route::post('admin/article/add','CmsService@addArticle');
Route::get('admin/logout','CmsService@logout');
Route::post('admin/logout','CmsService@logout');
Route::get('admin/login','CmsService@login');
Route::post('admin/login','CmsService@login');
Route::get('test', 'Test@index');
Route::get('/', 'Test@index');
Route::get('html_data', 'Html\HtmlPage@index');
Route::get('header', 'Common@header');
Route::get('footer', 'Common@footer');
//详情
// Route::get('info', 'Info@index');
Route::group(['namespace' => 'Front'], function () {
  Route::get('infoT', 'UC@infoT');
});
//地区级联
Route::post('select_change', 'Common@selectChange');
//领域级联
Route::post('domain_change', 'Common@domainChange');
Route::get('get_domain_second_list', 'Common@domainChange'); //获取二级领域关联列表，在行业资讯模块
//文件上传
Route::post('user/fileUpload', 'ApiController@uploadFile');
Route::post('fileUpload', 'ApiController@uploadFile');
//微信
Route::get('getAccessToken','WxController@getAccessToken');
Route::get('wxLogin','WxController@wxLogin');
Route::get('appver','ServiceController@getAppVersion');
Route::get('updateappver','ServiceController@updateAppVersion');
Route::post('verifyLogin','WxController@verifyLogin');
//发送短信
// Route::post('phone_code', 'ApiController@pushCode')->middleware(['formValidate:sendSms']); //发送验证码
Route::get('phone_code', 'ApiController@pushCode'); //发送验证码
//邮件验证
Route::get('email_auth', 'ApiController@emailAuth');
Route::group(['namespace' => 'SiteAce'], function () {

  // Route::get('/', 'Test@index');
  Route::get('index', 'Index@index');
  //langdingPage
  Route::get('landingpage', 'About@landingPage');
  Route::group(['prefix' => 'partner'],function(){
    Route::get('/', 'partner@market');
    Route::get('market', 'partner@market');
    Route::get('industry', 'partner@industry');
  });
  Route::group(['prefix' => 'application'],function(){
    Route::get('/', 'application@index');
    Route::get('index', 'application@index');
  });
  Route::group(['prefix' => 'introduction'],function(){
    Route::get('/', 'introduction@index');
    Route::get('index', 'introduction@index');
  });
  Route::group(['prefix' => 'twnews'],function(){
    Route::get('/', 'twnews@index');
    Route::get('index', 'twnews@index');
  });
  Route::group(['prefix' => 'about'],function(){
    Route::get('/', 'about@index');
    Route::get('index', 'about@index');
  });
});
Route::group(['namespace' => 'Front'], function () {
    //移动端
    Route::group(['prefix' => 'm'], function () {
        Route::get('/', 'Mobile@index');
        Route::get('preindex','Mobile@preIndex');
        Route::get('infoT','Mobile@info');
        Route::get('video','Mobile@video');
        // Route::get('info','Info@indexMobile');
        Route::group(['prefix' => 'market_coo'], function () {
            Route::get('/', 'Market@indexMobile');
            Route::get('info','Market@infoMobile');
            Route::get('video','Market@videoMobile');
        });
        Route::group(['prefix' => 'industry_coo'], function () {
            Route::get('/', 'Industry@indexMobile');
            Route::get('info','mobile@info');
            Route::get('mode','Industry@indexModeMobile');
            Route::get('listIds','Industry@listIdsMobile');
            Route::get('listFnc','Industry@listFncMobile');
            Route::get('company','Industry@companyMobile');
        });
        Route::group(['prefix' => 'product'], function () {
            Route::get('/', 'Product@indexMobile');
        });
        Route::group(['prefix' => 'tanwin_lib'], function () {
            Route::get('/', 'TanwinLib@indexMobile');
        });
        Route::group(['prefix' => 'about'], function () {
            Route::get('/', 'About@indexMobile');
        });
        Route::get('partner_family','About@partnerFamilyMobile');
        Route::get('tanwin_family','About@partnerFamilyMobile');
        Route::get('application','Mobile@apply');
        Route::get('partnerMarket','Mobile@partnerMarket');
        Route::get('partnerIndustry','Mobile@partnerIndustry');
        Route::get('projectIntro','Mobile@projectIntro');
        Route::get('report','Mobile@report');
    });
    Route::get('jsonlist', 'Market@jsonArticleList');
  });
    //首页
    // Route::get('/', 'Index@indexV31');

    //产品中心
    // Route::get('product_center', 'Product@index');
    // Route::get('product', 'Product@productInfo');

    //关于碳银
    // Route::get('about_tanwin', 'About@index');
    Route::get('tanwin_family', 'About@tanwinFamily');
    Route::get('partner_family', 'About@partnerFamily');
    // Route::get('news', 'About@newsList');
    // Route::get('news_info', 'About@newsInfo');
    // Route::post('news', 'About@newsList');
    // Route::get('contact_us', 'About@contactUs');
    // Route::get('join_us', 'About@joinUs');
    Route::get('ajaxArticleList','UC@ajaxArticleList');
    //市场合作
    /*
    Route::group(['prefix' => 'market_coo'], function () {
        Route::get('/', 'Market@index');
        Route::get('info','Market@info');
        //Route::get('tech', 'Market@tech');
        //Route::post('tech', 'Market@tech');
        Route::get('video','Market@video');
        Route::get('page', 'Market@htmlPage');
        Route::get('carbon/city', 'Market@carbonCity');
        Route::get('carbon/district', 'Market@carbonDistrict');
        Route::get('carbon/town', 'Market@carbonTown');
        Route::get('carbon/park', 'Market@carbonPark');

        Route::get('servicer', 'Market@servicerList');
        Route::post('servicer', 'Market@servicerList');
    });
    //产业合作
    Route::group(['prefix' => 'industry_coo'], function () {
        Route::get('/', 'Industry@index124');
        Route::get('mode','Industry@indexMode');
        Route::get('ajaxContent','Industry@ajaxContent');
        Route::get('solution', 'Industry@solution');
        Route::post('solution', 'Industry@solution');
        Route::get('expert', 'Industry@expert');
        Route::post('expert', 'Industry@expert');
        Route::get('chain_service', 'Industry@chainService');
        Route::post('chain_service', 'Industry@chainService');
        Route::get('green_result', 'Industry@greenResult');
        Route::post('green_result', 'Industry@greenResult');
        Route::get('ajaxCompanyList','Industry@ajaxCompanyList');
        Route::get('case','Industry@cases');
        Route::get('company','Industry@company');
        Route::get('ajaxArticleList','Industry@ajaxArticleList');
        Route::get('articleList','Industry@articleList');
    });
    */
    //资产合作
    // Route::group(['prefix' => 'asset_coo'], function () {
    //     Route::get('/', 'Asset@index');
    //     Route::post('/', 'Asset@index');
    // });
    //碳银研究院
    /*
    Route::group(['prefix' => 'tanwin_lib'], function () {
        Route::get('/', 'TanwinLib@indexInstitute');
        Route::post('/', 'TanwinLib@index');
    });
    //详情
    Route::get('info', 'Info@index');
    Route::get('infoT', 'UC@infoT');
    //表单提交
    Route::post('form', 'Form@index')->middleware(['formValidate']);
    Route::get('subject', 'Subject@index');

    //公司前台录入
    Route::post('add_company_info', 'Company@postCompanyInfo');
    Route::get('add_company_info_domain_page', 'Company@domainPage');
    Route::get('add_company_info_tech_path', 'Company@techPathPage');
    Route::get('company_login', 'Company@addCompanyInfo');
    Route::get('add_company_info_first_step', 'Company@firstStep');
    Route::get('add_company_info_second_step', 'Company@showAddInfo');
    Route::post('get_domain_tech_route_info', 'Company@getTechDomainInfo');
    //公司名字相同验证
    Route::post('company_name_auth', 'Company@companyNameAuth');
    Route::get('company_info', 'Company@companyInfo');
    //用户中心
    Route::group(['prefix' => 'uc'], function () {
        Route::get('ajaxSendSms', 'UC@ajaxSendSms');
        Route::get('ajaxLogin', 'UC@ajaxLogin');
        Route::post('ajaxLogin', 'UC@ajaxLogin');
        Route::get('/', 'UC@login');
        Route::get('welcome', 'UC@index');
        Route::get('regist', 'UC@regist');
        Route::post('ajaxRegist', 'UC@ajaxRegist');
        Route::get('msgCenter', 'UC@msgCenter');
        Route::post('msgDetail', 'UC@msgDetail');
        Route::get('msgDetail', 'UC@msgDetail');
        Route::get('userInfo', 'UC@userInfo');
        Route::get('ajaxDownList', 'UC@ajaxDownList');
        Route::get('down', 'UC@downCate');
        Route::get('activity', 'UC@activity');
        Route::get('activityInfo', 'UC@activityInfo');
        Route::get('ajaxSign', 'UC@ajaxSign');
        Route::get('logOut', 'UC@ajaxLogOut');
        Route::get('video', 'UC@videoCenter');
    });
});
*/
Route::get('oauth2', 'Auth\Index@oauthPage');
Route::post('oauth_login', 'Auth\Index@login'); //授权登录页面登录请求,并且登录成功获取到code
Route::post('oauth_token', 'Auth\Index@oauthToken'); //获取token
Route::post('get_user_info', 'Auth\Index@getUserInfo'); //获取用户信息

// Route::get('login', 'Admin\Login@login');
// Route::get('login', 'Front\UC@login');
// Route::post('login', 'Admin\User@userLogin')->middleware(['formValidate:login']);
// Route::get('logout', 'Admin\User@userLogout');
Route::post('forget_pwd', 'Admin\User@userForgetPwd');
Route::post('regist', 'Admin\User@userRegist');
Route::post('login_by_sms', 'Admin\User@userLoginBySms'); //用户通过短信登录

Route::get('regist', 'Admin\Login@regist');
Route::get('forget_pwd', 'Admin\Login@forgetPwd');
/*
Route::group(['namespace' => 'Admin', 'prefix' => 'user', 'middleware' => ['formValidate:logined']], function () {

    Route::post('update_pwd', 'User@userForgetPwd');

    Route::get('/', 'User@account');
    Route::get('account', 'User@account');
    Route::get('company', 'User@companyInfo');
    Route::get('company_edit', 'User@companyEdit');
    Route::get('password', 'User@passwordInfo');
    //Route::get('proprietor', 'User@proprietor'); //我是业主
    //Route::get('proprietor_edit', 'User@proprietorEdit'); //我是业主

    //技术
    Route::get('tech', 'Tech@techList');
    Route::post('tech', 'Tech@techList');
    Route::get('tech_add', 'Tech@addTech');
    Route::get('tech_edit', 'Tech@editTech');
    Route::get('tech_view', 'Tech@viewTech'); //技术管理 详情
    //案例
    Route::get('case', 'Cases@caseList');
    Route::post('case', 'Cases@caseList');
    Route::get('case_add', 'Cases@addCase');
    Route::get('case_edit', 'Cases@editCase');
    Route::get('case_view', 'Cases@caseView'); //案例管理 详情
    Route::get('case_tech_chose', 'Cases@techChose'); //技术选择
    //设备
    Route::get('device', 'Device@deviceList');
    Route::post('device', 'Device@deviceList');
    Route::get('device_view', 'Device@deviceViewInfo'); //设备详情--查看
    Route::get('device_edit', 'Device@editDevice'); //设备管理 编辑
    Route::get('device_number', 'Device@editDeviceNumberList'); //设备管理 编辑 管理型号
    //Route::get('device_number_edit', 'Device@editDeviceNumber'); //设备管理 编辑 管理型号 编辑
    Route::get('device_add', 'Device@addDevice'); //设备管理 新增
    //Route::get('device_number_add', 'Admin\DeviceController@addDeviceNumber'); //设备管理 添加型号

    Route::post('action', 'FormAction@index');

});
*/
Route::group(['prefix' => 'api_test'], function () {
    Route::post('get_user_base_info', 'ApiTest@getUserBaseInfo');
    Route::post('get_user_login_base_info', 'ApiTest@getUserLoginBaseInfo');
});
// 2018-04-23后改版页面的路由规则由此向下
Route::group(['namespace' => 'SiteAce','prefix'=>'SiteAce'], function () {
  Route::get('/', 'Index@index');
  Route::get('index', 'Index@index');
  Route::group(['prefix' => 'partner'],function(){
    Route::get('/', 'Partner@market');
    Route::get('market', 'Partner@market');
    Route::get('industry', 'Partner@industry');
  });
  Route::group(['prefix' => 'application'],function(){
    Route::get('/', 'Application@index');
    Route::get('index', 'Application@index');
  });
  Route::group(['prefix' => 'introduction'],function(){
    Route::get('/', 'Introduction@index');
    Route::get('index', 'Introduction@index');
  });
  Route::group(['prefix' => 'twnews'],function(){
    Route::get('/', 'Twnews@index');
    Route::get('index', 'Twnews@index');
  });
  Route::group(['prefix' => 'about'],function(){
    Route::get('/', 'About@index');
    Route::get('index', 'About@index');
  });
  Route::group(['prefix' => 'store'],function(){
    Route::get('piclist', 'Store@picList');
    Route::get('lastsku', 'Store@indexSkuList');
    Route::get('getskubycategory', 'Store@getSkuByCategory');
    Route::get('getcategory', 'Store@getCategory');
    Route::post('createbill', 'Store@createBill');
    Route::get('getbilllist', 'Store@getBillList');
    Route::post('getcode', 'Store@getCode');
    Route::get('getcode', 'Store@getCode');
    Route::post('login', 'Store@login');
    Route::get('login', 'Store@login');
    Route::get('getskudetail', 'Store@getSkuDetail');
    Route::get('addresslist', 'Store@addressList');
    Route::get('editaddress', 'Store@editAddress');
    Route::get('createaddress', 'Store@createAddress');
    Route::post('editaddress', 'Store@editAddress');
    Route::get('editaddress', 'Store@editAddress');
    Route::post('createaddress', 'Store@createAddress');

    Route::get('editusername', 'Store@editUserName');
    Route::post('editusername', 'Store@editUserName');
    Route::get('getusername', 'Store@getUserName');
    Route::get('getrealnamestate', 'Store@getRealNameState');
    Route::post('editrealnamestate', 'Store@editRealNameState');
    Route::get('editrealnamestate', 'Store@editRealNameState');
    Route::post('edituserphone', 'Store@editUserPhone');
    Route::get('edituserphone', 'Store@editUserPhone');
  });
});
